import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_ahj_app/base/utils/screen_util.dart';
import 'package:flutter_ahj_app/base/utils/textUtils.dart';
import 'package:flutter_ahj_app/base/values/SQColor.dart';
import 'package:flutter_ahj_app/base/values/dimens.dart';

class LoadingWidgetCenter extends StatelessWidget {
  String content;
  Color bacColor;

  LoadingWidgetCenter({Key key, this.content, this.bacColor});

  @override
  Widget build(BuildContext context) {
    return Container(
      width: ScreenUtil.getInstance().screenWidth / 3,
      height: ScreenUtil.getInstance().screenWidth / 3,
      decoration: BoxDecoration(
          color: SQColor.per38Black,
          borderRadius: BorderRadius.all(Radius.circular(Dimens.dimens4))),
      child: Column(
        crossAxisAlignment: CrossAxisAlignment.center,
        mainAxisAlignment: MainAxisAlignment.center,
        children: <Widget>[
          CircularProgressIndicator(),
          Container(height: Dimens.dimens16),
          Text(TextUtils.getStr(content, defaultStr: "数据加载中..."),
              style:
                  TextStyle(color: SQColor.white, fontSize: Dimens.textSize28)),
        ],
      ),
    );
  }
}
